From: Florian Müllner Date: Tue, 20 Feb 2018 17:16:52 +0000 (+0100) Subject: appDisplay: Fall back to app name in icon menu X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~929^2~5^2~50 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f0557ea05c0912ee8d8941b1e903606c39f8ee11;p=gnome-shell.git appDisplay: Fall back to app name in icon menu The app icon's context menu contains a list of open windows, identified by their title. As we currently don't handle the case where the app didn't set a title, we end up with empty menu items which looks clearly broken. Fall back to the app's name in that case. https://gitlab.gnome.org/GNOME/gnome-shell/issues/26 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 74c772d50..2c4d2d1da 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1870,7 +1870,9 @@ var AppIconMenu = new Lang.Class({ this._appendSeparator(); separatorShown = true; } - let item = this._appendMenuItem(window.title); + let title = window.title ? window.title + : this._source.app.get_name(); + let item = this._appendMenuItem(title); item.connect('activate', () => { this.emit('activate-window', window); });